#ifndef QMLWINDOW_H
#define QMLWINDOW_H

#include <QDialog>
#include <QProcess>
#include <QMainWindow>
#include <QtDeclarative/QDeclarativeView>
#include "handlemplayer.h"
#include <QKeyEvent>
#include <QDebug>

class QmlWindow : public QDeclarativeView
{
    Q_OBJECT
public:
    explicit QmlWindow(QWidget *parent = 0);

signals:
    void qmlViewKeyPressed(int keyCode);
    void focusInEventSglRedirect();
    void focusOutEventSglRedirect();
    void resizeEventSglRedirect();
    void moveEventSglRedirect();
    void showEventSglRedirect();
    void hideEventSglRedirect();


protected :
    void focusInEvent(QFocusEvent *e);
    void focusOutEvent(QFocusEvent *e);
    void keyPressEvent ( QKeyEvent * event );
    void resizeEvent( QResizeEvent *e);
    void moveEvent(QMoveEvent *e);
    void hideEvent(QHideEvent *e);
    void showEvent ( QShowEvent * e);

private:
    //bool modeComposite;

public slots:
    void onExternKeyPressEvent(QKeyEvent * event);

};

#endif // QMLWINDOW_H
